snippet enum "Enumeration" !b
enum ${1:name}
{
  ${2:ITEM},
};$0
endsnippet

snippet main "Main function" !b
int main(int argc, ${1:const }char** argv)
{
  ${0:/* code */}
  return 0;
}
endsnippet

snippet once "Include header guard" !b
#ifndef ${1:`!p
if not snip.c:
  import string
  snip.rv = re.sub(r'[^A-Za-z0-9]+','_', snip.fn).upper()
else:
  snip.rv = snip.c`}
#define $1

${0}

#endif /* $1 */

endsnippet

snippet el "Else block" !b
else
{
  ${0:/* code */}
}
endsnippet

snippet elif "Else-if block" !b
else if (${1:/* condition */})
{
  ${0:/* code */}
}
endsnippet

snippet fun "Function with implementation" !b
${1:void} ${2:f}(${3:arguments})
{
  $0
}
endsnippet
